<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="crm.util.ParamUtil"%>
<%@page import="java.util.Collection"%>
<%@page import="crm.control.StatisticsControl"%>
<%@page import="java.util.Iterator"%>
<%@page import="crm.model.Statistics"%>
<%@page import="crm.control.EmployeesControl"%>
<%@page import="crm.control.RecepitControl"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>

<body>
<%
       request.setCharacterEncoding("UTF-8");
       int employee_id=ParamUtil.getInt(request,"employee_id");
       System.out.print(employee_id);
       
        
%>
<form>
</form>
<form>
     <table>
          <table>
				<thead>
					<tr>
					    <th>
							回款时间
						</th>
						<th>
							回款金额
						</th>
						<th>
							回款人
						</th>
						
						<th>
							合同名称
						</th>
						<th>
							操作
						</th>
					</tr>
				</thead>
				<tbody>
				      <%
				        int pages = ParamUtil.getInt(request, "pages", 0);
						int rowsPerpage = ParamUtil.getInt(request, "pageSize", 10);
						int i=0;
						Collection statistics=StatisticsControl.searchHuiKuanByEmp(employee_id,rowsPerpage,pages);
						Iterator iterator=statistics.iterator();
						while(iterator.hasNext()){
						   i++;
						   Statistics statistics2=(Statistics)iterator.next();
						
				       %>
				</tbody>
     </table>
</form>
<form>
     <table>
     <tr>         
         <td><%=statistics2.getDate() %></td>
         <td><%=statistics2.getAdd_money() %></td>
         <td><%=EmployeesControl.getEmployeesName(statistics2.getEmployee_id()) %></td>
         <td><%=RecepitControl.getRecepitById(statistics2.getRecepit_id()).getTitle() %></td>
     </tr>
         <%} %>
     </table>
     	<%
				out.println(StatisticsControl.pageInstance.getToolsMenu(pages));
			%>
 
</form>
</body>
</html>